package com.Ddq;

import java.util.ArrayList;
import java.util.Iterator;

public class b1 {
    public static void main(String[] args) {
        ArrayList<String> al = new ArrayList<String>();
        al.add("aaa");
        al.add("bbb");
        al.add("ccc");
        al.add("aaa");
        al.add("bbb");
        al.add("bbb");
        al.remove(0);
        al.remove(0);
        al.remove(2);
        Iterator<String> it = al.iterator();

        while (it.hasNext()) {
            String s = it.next();
            System.out.println(s);
        }
        System.out.println("--------");
        for (String s : al) {
            System.out.println(s);
        }
    }
}
